Derives from Repeater to add basic support for paging. For more details, see Repeater Web Server Control Overview.

Background

The Repeater control is used to create output consisting of one, or two alternating, item templates. The data in those templates are based on items that are read from a specified data source. The PagedRepeater control exists to correct a common limitation that the Repeater control outputs every item without any support for limitation the number of items that should be read, or where to start reading.

Examples

The following code would iterate through the dsMembers data source (not shown) and output the first 10 usernames.

HTML
<csx:PagedRepeater Runat="Server" DataSourceId="dsMembers" PageSize="10" PageNumber="1">
  <ItemTemplate>
    <asp:Label Runat="Server" Text='<%# Eval("Username") %>' />
  </ItemTemplate>
</csx:PagedRepeater>

The following code would iterate through the dsMembers data source (not shown) and output the second page of 20 members.

HTML
<csx:PagedRepeater Runat="Server" DataSourceId="dsMembers" PageSize="20" PageNumber="2">
  <ItemTemplate>
    <asp:Label Runat="Server" Text='<%# Eval("Username") %>' />
  </ItemTemplate>
</csx:PagedRepeater>